package opencascade;

/**
 *  Describes algorithms for offsetting wires from a set of
 *  wires contained in a planar face.
 *  A MakeOffset object provides a framework for:
 *  - defining the construction of an offset,
 *  - implementing the construction algorithm, and
 *  - consulting the result.
 */
public class BRepOffsetAPI_MakeOffset extends BRepBuilderAPI_MakeShape {

  private long swigCPtr;
  BRepOffsetAPI_MakeOffset(long cPtr, boolean cMemoryOwn) 
  {
    super(OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  BRepOffsetAPI_MakeOffset(long cPtr, boolean cMemoryOwn, Object Parent) 
  {
    super(OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_SWIGUpcast(cPtr), cMemoryOwn, Parent);
    swigCPtr = cPtr;
  }

  static long getCPtr(BRepOffsetAPI_MakeOffset obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }
  
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        OCCwrapJavaJNI.delete_BRepOffsetAPI_MakeOffset(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  /**
   *  Constructs an algorithm for creating an empty offset
   */
  public BRepOffsetAPI_MakeOffset() {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_0(), true);
  }

  /**
   *  Constructs an algorithm for creating an algorithm
   *  to build parallels to the spine Spine
   */
  public BRepOffsetAPI_MakeOffset( TopoDS_Face  Spine, GeomAbs_JoinType Join, long IsOpenResult) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_1(TopoDS_Face.getCPtr(Spine), Spine, Join.swigValue(), IsOpenResult), true);
  }

  public BRepOffsetAPI_MakeOffset( TopoDS_Face  Spine, GeomAbs_JoinType Join) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_2(TopoDS_Face.getCPtr(Spine), Spine, Join.swigValue()), true);
  }

  public BRepOffsetAPI_MakeOffset( TopoDS_Face  Spine) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_3(TopoDS_Face.getCPtr(Spine), Spine), true);
  }

  /**
   *  Initializes the algorithm to construct parallels to the spine Spine.
   *  Join defines the type of parallel generated by the
   *  salient vertices of the spine.
   *  The default type is GeomAbs_Arc where the vertices generate
   *  sections of a circle.
   *  If join type is GeomAbs_Intersection, the edges that
   *  intersect in a salient vertex generate the edges
   *  prolonged until intersection.
   */
  public void Init( TopoDS_Face  Spine, GeomAbs_JoinType Join, long IsOpenResult) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Init__SWIG_0(swigCPtr, this, TopoDS_Face.getCPtr(Spine), Spine, Join.swigValue(), IsOpenResult);
  }

  /**
   *  Initialize the evaluation of Offseting.
   */
  public void Init( TopoDS_Face  Spine, GeomAbs_JoinType Join) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Init__SWIG_1(swigCPtr, this, TopoDS_Face.getCPtr(Spine), Spine, Join.swigValue());
  }

  public void Init( TopoDS_Face  Spine) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Init__SWIG_2(swigCPtr, this, TopoDS_Face.getCPtr(Spine), Spine);
  }

  public BRepOffsetAPI_MakeOffset( TopoDS_Wire  Spine, GeomAbs_JoinType Join, long IsOpenResult) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_4(TopoDS_Wire.getCPtr(Spine), Spine, Join.swigValue(), IsOpenResult), true);
  }

  public BRepOffsetAPI_MakeOffset( TopoDS_Wire  Spine, GeomAbs_JoinType Join) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_5(TopoDS_Wire.getCPtr(Spine), Spine, Join.swigValue()), true);
  }

  public BRepOffsetAPI_MakeOffset( TopoDS_Wire  Spine) {
    this(OCCwrapJavaJNI.new_BRepOffsetAPI_MakeOffset__SWIG_6(TopoDS_Wire.getCPtr(Spine), Spine), true);
  }

  public void Init(GeomAbs_JoinType Join, long IsOpenResult) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Init__SWIG_3(swigCPtr, this, Join.swigValue(), IsOpenResult);
  }

  public void Init(GeomAbs_JoinType Join) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Init__SWIG_4(swigCPtr, this, Join.swigValue());
  }

  public void Init() {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Init__SWIG_5(swigCPtr, this);
  }

  /**
   *  Initializes the algorithm to construct parallels to the wire Spine.
   */
  public void AddWire( TopoDS_Wire  Spine) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_AddWire(swigCPtr, this, TopoDS_Wire.getCPtr(Spine), Spine);
  }

  /**
   *  Computes a parallel to the spine at distance Offset and
   *  at an altitude Alt from the plane of the spine in relation
   *  to the normal to the spine.
   *  Exceptions: StdFail_NotDone if the offset is not built.
   */
  public void Perform(double Offset, double Alt) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Perform__SWIG_0(swigCPtr, this, Offset, Alt);
  }

  public void Perform(double Offset) {
    OCCwrapJavaJNI.BRepOffsetAPI_MakeOffset_Perform__SWIG_1(swigCPtr, this, Offset);
  }

}
